package com.xuecheng.content.service;

import com.xuecheng.commons.model.dto.CourseAuditDto;
import com.xuecheng.commons.model.dto.CourseBaseDto;
import com.xuecheng.commons.model.dto.CourseDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.CourseBaseVo;
import com.xuecheng.commons.model.vo.PageResponseResult;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.content.domain.CourseBase;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * <p>
 * 课程基本信息 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-09-17
 */
public interface CourseBaseService extends IService<CourseBase> {

    //分页查询课程
    PageResponseResult findAll(CourseDto dto, PageRequest request);

    //上传课程封面图片
    ResponseResult<String> upload(MultipartFile uploadFile) throws IOException, Exception;

    //保存课程
    ResponseResult<CourseBaseVo> saveCourseBase(CourseBaseDto dto);

    //更新课程
    ResponseResult<CourseBaseVo> updateCourse(CourseBaseDto dto);

    //提交课程
    ResponseResult commit(Long courseBaseId);

    //运营平台审核课程
    ResponseResult approve(CourseAuditDto dto);
}
